home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbasicpg.zip
/
SOUND-1.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-08-31
|
474b
|
20 lines
' SOUND-1.BAS
' This program demonstrates the SOUND statement.
CLS
INPUT "Please enter an octave value (1-7): ", octave%
' play one octave
FOR i% = 1 TO 8
READ note% ' read frequency of note
note% = note% * (2 ^ octave%) ' raise note to desired octave
SOUND note%, 12 ' play note
NEXT i%
' frequencies of the major notes in the second octave
DATA 65, 73, 82, 87, 98, 110, 123, 131